//
//  ReminderAutonymView.m
//  YTwallet
//
//  Created by ZhangLin on 2019/3/19.
//  Copyright © 2019年 hadrlog. All rights reserved.
//

#import "ReminderAutonymView.h"
#import <Masonry.h>

@implementation ReminderAutonymView

-(instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        [self setupViews];
    }
    return self;
}

-(void)setupViews{
    self.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.5];
    
    self.topView = [[UIView alloc] init];
    self.topView.backgroundColor = [UIColor whiteColor];
    self.topView.layer.cornerRadius = 8;
    [self addSubview:self.topView];
    [self.topView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(45);
        make.right.mas_equalTo(-45);
        make.centerY.equalTo(self);
        make.height.mas_equalTo(340);
    }];
    
    
    
    
    self.headerImv = [[UIImageView alloc] init];
    self.headerImv.image = [UIImage imageNamed:@"dialog_bg_shiming"];
    [self.topView addSubview:self.headerImv];
    [self.headerImv mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(50);
        make.right.mas_equalTo(-50);
        make.top.mas_equalTo(20);
        make.height.equalTo(self.headerImv.mas_width).multipliedBy(0.58);
    }];
    
    self.tipsLab = [[UILabel alloc] init];
    self.tipsLab.text = @"您还未实名认证";
    self.tipsLab.font = [UIFont systemFontOfSize:16];
    self.tipsLab.textColor = [UIColor colorWithRed:51 / 255.0 green:51 / 255.0 blue:51 / 255.0 alpha:1];
    [self.topView addSubview:self.tipsLab];
    [self.tipsLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.topView);
        make.top.equalTo(self.headerImv.mas_bottom).offset(15);
    }];
    
    self.tipsAuthenLab = [[UILabel alloc] init];
    self.tipsAuthenLab.text = @"暂无法使用该功能";
    self.tipsAuthenLab.font = [UIFont boldSystemFontOfSize:18];
    self.tipsAuthenLab.textColor = [UIColor colorWithRed:51 / 255.0 green:51 / 255.0 blue:51 / 255.0 alpha:1];
    [self.topView addSubview:self.tipsAuthenLab];
    [self.tipsAuthenLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.topView);
        make.top.equalTo(self.tipsLab.mas_bottom).offset(10);
    }];
    
    self.toAuthenBtn = [UIButton buttonWithType:(UIButtonTypeCustom)];
    [self.toAuthenBtn setTitle:@"去实名认证" forState:(UIControlStateNormal)];
    self.toAuthenBtn.layer.cornerRadius = 22;
    self.toAuthenBtn.backgroundColor = [UIColor colorWithRed:91 / 255.0 green:113 / 255.0 blue:255 / 255.0 alpha:1];
    [self.toAuthenBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    self.toAuthenBtn.titleLabel.font = [UIFont systemFontOfSize:16];
    [self.topView addSubview:self.toAuthenBtn];
    [self.toAuthenBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(25);
        make.right.mas_equalTo(-25);
        make.height.mas_equalTo(44);
        make.top.equalTo(self.tipsAuthenLab.mas_bottom).offset(30);
    }];
    
    self.nextTimeReminderBtn = [UIButton buttonWithType:(UIButtonTypeCustom)];
    [self.nextTimeReminderBtn setTitle:@"下次再说" forState:(UIControlStateNormal)];
    self.nextTimeReminderBtn.titleLabel.font = [UIFont systemFontOfSize:14];
    [self.nextTimeReminderBtn setTitleColor:[UIColor colorWithRed:91 / 255.0 green:113 / 255.0 blue:255 / 255.0 alpha:1] forState:(UIControlStateNormal)];
    [self.topView addSubview:self.nextTimeReminderBtn];
    [self.nextTimeReminderBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self);
        make.top.equalTo(self.toAuthenBtn.mas_bottom).offset(20);
    }];
    
}

@end
